1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

vfmt: change all '$expr' to '${expr}' (#16428)

This commit is contained in:
yuyi
2022-11-15 21:53:13 +08:00
committed by GitHub
parent 56239b4a23
commit 017ace6ea7
859 changed files with 7156 additions and 7135 deletions

View File

@@ -69,7 +69,7 @@ fn updating_priority<T>(mut prior_queue []T, search_data int, new_priority int)
i++
// all the list was examined
if i >= lenght_pq {
print('\n This data $search_data does exist ... PRIORITY QUEUE problem\n')
print('\n This data ${search_data} does exist ... PRIORITY QUEUE problem\n')
exit(1) // panic(s string)
}
} // end for
@@ -98,7 +98,7 @@ fn all_adjacents<T>(g [][]T, v int) []int {
fn print_solution<T>(dist []T) {
print('Vertex \tDistance from Source')
for node in 0 .. (dist.len) {
print('\n $node ==> \t ${dist[node]}')
print('\n ${node} ==> \t ${dist[node]}')
}
}
@@ -107,7 +107,7 @@ fn print_paths_dist<T>(path []T, dist []T) {
print('\n Read the nodes from right to left (a path): \n')
for node in 1 .. (path.len) {
print('\n $node ')
print('\n ${node} ')
mut i := node
for path[i] != -1 {
print(' <= ${path[i]} ')
@@ -231,7 +231,7 @@ fn main() {
graph = g_value.clone() // graphs_sample[g].clone() // choice your SAMPLE
// allways starting by node 0
start_node := 0
println('\n\n Graph ${index + 1} using Dijkstra algorithm (source node: $start_node)')
println('\n\n Graph ${index + 1} using Dijkstra algorithm (source node: ${start_node})')
dijkstra(graph, start_node)
}